<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>商家 | 营销管理</title>

    <link href="css/bootstrap.min.css" rel="stylesheet">
    <link href="font-awesome/css/font-awesome.css" rel="stylesheet">
    <link href="css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="css/animate.css" rel="stylesheet">
    <link href="css/style.css" rel="stylesheet">


    <!-- Sweet Alert -->
    <link href="css/plugins/sweetalert/sweetalert.css" rel="stylesheet">

    <link href="css/plugins/steps/jquery.steps.css" rel="stylesheet">


    <style type="text/css">
        .trorder {
            background: #f8f8f8;
            border: 1px solid #f2f2f2;
            text-align: left;
        }
        .table>thead>tr>th, .table>tbody>tr>th, .table>tfoot>tr>th, .table>thead>tr>td, .table>tbody>tr>td, .table>tfoot>tr>td {
            vertical-align: middle;
        }
        .table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td {
            border-top: 1px solid #e7eaec;
            line-height: 1.42857;
            padding: 8px;
            vertical-align: middle;
        }
        .trbody td {
            text-align: center;
            vertical-align: top;
            border-left: 1px solid #f2f2f2;
            overflow: hidden;
            font-size: 14px;
        }
        .ops {
            border-right: 1px solid #f2f2f2;
            text-align: center;
        }
        .table td a{cursor: pointer;}
        .page-toolbar {
            position: relative;
            width: 100%;
            padding: 0;
            height: 35px;
            line-height: 1;
            vertical-align: middle;
            margin-bottom: 15px;
        }
        .input-group-select {
            float: right;
        }
    </style>
</head>

<body>

    <div id="wrapper">

        <!--菜单-->
        <nav class="navbar-default navbar-static-side" role="navigation">
            <div class="sidebar-collapse">
                <ul class="nav metismenu" id="side-menu">
                    <li class="nav-header">
                        <div class="dropdown profile-element"> <span>
                            <img alt="image" class="img-circle" src="img/profile_small.jpg" />
                             </span>
                            <a data-toggle="dropdown" class="dropdown-toggle" href="dashboard_2.html#">
                            <span class="clear"> <span class="block m-t-xs"> <strong class="font-bold">wyb</strong>
                             </span> <span class="text-muted text-xs block">渠道管理员(商家) <b class="caret"></b></span> </span> </a>
                            <ul class="dropdown-menu animated fadeInRight m-t-xs">
                                <li><a href="#">个人信息</a></li>
                                <li class="divider"></li>
                                <li><a href="login.html">退出</a></li>
                            </ul>
                        </div>
                        <div class="logo-element">
                            IN+
                        </div>
                    </li>
                    <li class="active">
                        <a href="shop_index.html"><i class="fa fa-th-large"></i> <span class="nav-label">首页</span>
                            <span class="fa arrow"></span></a>
                    </li>

                    <li class="">
                        <a href="shop_order.html"><i class="fa fa-th-large"></i> <span class="nav-label">订单管理</span>
                            <span class="fa arrow"></span></a>
                    </li>

                    <li class="">
                        <a href="shop_table.html"><i class="fa fa-th-large"></i> <span class="nav-label">餐桌管理</span>
                            <span class="fa arrow"></span></a>
                    </li>

                    <li class="">
                        <a href="shop_food.html"><i class="fa fa-th-large"></i> <span class="nav-label">菜品管理</span>
                            <span class="fa arrow"></span></a>
                    </li>

                    <!--<li class="">
                        <a href="shop_food_category.html"><i class="fa fa-th-large"></i> <span class="nav-label">菜品分类管理</span>
                            <span class="fa arrow"></span></a>
                    </li>-->

                    <li class="">
                        <a href="shop_waiter.html"><i class="fa fa-th-large"></i> <span class="nav-label">店员管理</span>
                            <span class="fa arrow"></span></a>
                    </li>

                    <!--<li class="">
                        <a href="shop_member.html"><i class="fa fa-th-large"></i> <span class="nav-label">会员管理</span>
                            <span class="fa arrow"></span></a>
                    </li>

                    <li class="">
                        <a href="shop_hongbao.html"><i class="fa fa-th-large"></i> <span class="nav-label">红包管理</span>
                            <span class="fa arrow"></span></a>
                    </li>

                    <li class="">
                        <a href="shop_cuxiao.html"><i class="fa fa-th-large"></i> <span class="nav-label">促销品管理</span>
                            <span class="fa arrow"></span></a>
                    </li>


                    <li class="">
                        <a href="shop_cuxiao.html"><i class="fa fa-th-large"></i> <span class="nav-label">支付管理</span>
                            <span class="fa arrow"></span></a>
                    </li>
                    -->

                    <li class="">
                        <a href="shop_print.html"><i class="fa fa-th-large"></i> <span class="nav-label">打印机管理</span>
                            <span class="fa arrow"></span></a>
                    </li>


                    <li class="">
                        <a href="shop_sale.html"><i class="fa fa-th-large"></i> <span class="nav-label">营销管理</span>
                            <span class="fa arrow"></span></a>
                    </li>

                    <li class="">
                        <a href="shop_adv.html"><i class="fa fa-th-large"></i> <span class="nav-label">广告管理</span>
                            <span class="fa arrow"></span></a>
                    </li>
                </ul>
            </div>
        </nav>

        <div id="page-wrapper" class="gray-bg">

            <div class="row border-bottom">
                <nav class="navbar navbar-static-top white-bg" role="navigation" style="margin-bottom: 0">
                    <div class="navbar-header">
                        <a class="navbar-minimalize minimalize-styl-2 btn btn-primary " href="shop_index.html#"><i class="fa fa-bars"></i> </a>
                    </div>
                    <ul class="nav navbar-top-links navbar-right">
                        <li>
                            <span class="m-r-sm text-muted welcome-message">渠道管理后台.</span>
                        </li>

                        <li>
                            <a href="shop_index.html">
                                <i class="fa fa-sign-out"></i>
                            </a>
                        </li>
                    </ul>
                </nav>
            </div>

            <div class="row wrapper border-bottom white-bg page-heading">
                <div class="col-lg-10">
                    <h2>营销管理</h2>
                    <ol class="breadcrumb">
                        <li>
                            <a href="index.html">首页</a>
                        </li>
                        <li>
                            <a>营销管理</a>
                        </li>
                        <li class="active">
                            <strong>营销管理</strong>
                        </li>
                    </ol>
                </div>
                <div class="col-lg-2">

                </div>
            </div>
        <div class="wrapper wrapper-content animated fadeInRight">
            <div class="row">
                <div class="col-lg-12">
                    <div class="tabs-container">
                        <ul class="nav nav-tabs">
                            <li class="active"><a data-toggle="tab" href="tabs.html#tab-1"> 营销规则</a></li>
                            <li class=""><a data-toggle="tab" href="tabs.html#tab-2">社交立减金</a></li>
                            <li class=""><a data-toggle="tab" href="tabs.html#tab-3">卡券列表</a></li>
                            <li class=""><a data-toggle="tab" href="tabs.html#tab-4">设置</a></li>
                        </ul>
                        <div class="tab-content">
                            <div id="tab-1" class="tab-pane active">
                                <div class="panel-body">
                                    <div class="row">
                                        <div class="col-sm-9 m-b-xs">
                                            <div data-toggle="buttons" class="btn-group">
                                                <a href="#guize" data-toggle="modal" class="btn btn-sm btn-primary">
                                                    <i class="fa fa-plus"></i>添加营销规则</a>
                                            </div>
                                        </div>
                                    </div>


                                    <table class="table table-bordered table-hover">
                                        <thead class="navbar-inner">
                                        <tr>
                                            <th width="120px">规则名称</th>
                                            <th width="150px" class="text-center">活动时间</th>
                                            <th width="70px" class="text-center">状态 <i class="fa fa-question-circle" data-toggle="tooltip" data-placement="top" data-original-title="目前只能开启一个规则"></i></th>
                                            <th width="100px" class="text-center">创建时间</th>
                                            <th style="width:250px; text-align:right;">操作</th>
                                        </tr>
                                        </thead>
                                        <tbody>
                                            <tr>
                                                <td>推荐立减</td>
                                                <td class="text-center">
                                                    2018-05-24 23:00:00 至 2018-05-24 23:00:00
                                                </td>
                                                <td class="text-center">
                                                    <!--<span class="text-danger">未开始</span>
                                                    <span class="text-danger">已结束</span>-->
                                                    <!--<span class="text-warning">暂停中</span>-->
                                                    <span class="label label-success">进行中</span>
                                                </td>
                                                <td class="text-center">2018-05-24 23:00:00</td>
                                                <td style="text-align:right;">
                                                    <a href="#" class="btn btn-success btn-sm" title="查看详情">编辑</a>
                                                    <!--<a href="#"  class="btn btn-info btn-sm" title="启用" onclick="if(!confirm('启用后其他规则将自动暂停，是否继续启用?')) return false;">启用</a>-->
                                                    <a href="#"  class="btn btn-danger btn-sm" title="暂停" onclick="if(!confirm('确定暂停?')) return false;">暂停</a>
                                                    <a href="#"  class="btn btn-default btn-sm" title="删除"
                                                       onclick="if(!confirm('删除后将不可恢复，确定删除吗?')) return false;">删除</a>
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                            <div id="tab-2" class="tab-pane">
                                <div class="panel-body">
                                    <div class="row">
                                        <div class="col-sm-9 m-b-xs">
                                            <div data-toggle="buttons" class="btn-group">
                                                <a href="#shejiaolijian" data-toggle="modal" class="btn btn-sm btn-primary">
                                                    <i class="fa fa-plus"></i>添加社交立减金活动</a>
                                            </div>
                                        </div>
                                    </div>

                                    <table class="table table-bordered table-hover">
                                        <thead>
                                        <tr>
                                            <th width="100px">活动id</th>
                                            <th width="150px">卡券id</th>
                                            <th width="150px">活动时间</th>
                                            <th width="170px">单个礼包立减金数量</th>
                                            <th width="100px">领取上限</th>
                                            <th width="100px">最低支付金额</th>
                                            <th width="100px">发放人群</th>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        <tr>
                                            <td>1111</td>
                                            <td>1111</td>
                                            <td>2018-05-23 至<br>2018-05-24</td>
                                            <td>2</td>
                                            <td>13</td>
                                            <td>100</td>
                                            <td>全部用户</td>
                                        </tr>
                                        <tr>
                                            <td>2222</td>
                                            <td>2222</td>
                                            <td>2018-05-23 至<br>2018-05-24</td>
                                            <td>2</td>
                                            <td>13</td>
                                            <td>100</td>
                                            <td>新用户</td>
                                        </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                            <div id="tab-3" class="tab-pane">
                                <div class="panel-body">

                                    <div class="row">
                                        <div class="col-sm-9 m-b-xs">
                                            <div data-toggle="buttons" class="btn-group">
                                                <a href="#chooseCouponType" data-toggle="modal" class="btn btn-sm btn-primary">
                                                    <i class="fa fa-plus"></i>添加优惠券</a>


                                                <a href="#chooseCouponType1" data-toggle="modal" class="btn btn-sm btn-primary">
                                                    <i class="fa fa-plus"></i>微信代金券</a>

                                                <a href="#chooseCouponType1" data-toggle="modal" class="btn btn-sm btn-primary">
                                                    <i class="fa fa-plus"></i>社交代金券</a>

                                            </div>
                                        </div>
                                    </div>

                                    <table class="table table-bordered table-hover">
                                        <thead>
                                            <tr>
                                                <th width="120px">卡券名称</th>
                                                <th width="80px">类型</th>
                                                <th width="150px">卡券有效期</th>
                                                <th width="70px" class="text-center">状态</th>
                                                <th width="100px">库存</th>
                                                <th width="50px">限领</th>
                                                <th style="width:450px; text-align:right;">操作</th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            <tr>
                                                <td>我的优惠券</td>
                                                <td>
                                                    <!--代金券-->
                                                    优惠券
                                                </td>
                                                <td>
                                                    2018-05-24
                                                </td>
                                                <td class="text-center">
                                                    <span class="label label-success">已在公众平台投放</span>
                                                    <!--
                                                    <span class="label label-info">审核中</span>
                                                    <span class="label label-danger">未通过</span>
                                                    <span class="label label-success">已通过</span>
                                                    <span class="label label-default">卡券被商户删除</span>
                                                    <span class="label label-warning">已在公众平台投放</span>-->
                                                </td>
                                                <td>200</td>
                                                <td>1</td>
                                                <td style="text-align:right;">
                                                    <a href="#" data-toggle="modal" class="btn btn-white btn-sm js-publish">投放</a>
                                                    <a href="#" class="btn btn-white btn-sm change_quantity">修改库存</a>
                                                    <a href="#" class="btn btn-success btn-sm" title="查看详情">查看详情</a>
                                                    <a href="#log" data-toggle="modal" class="btn btn-white btn-sm" title="领取记录">领取记录</a>
                                                    <a href="#" class="btn btn-white btn-sm" title="删除" onclick="if(!confirm('删除后将不可恢复，确定删除吗?')) return false;">删除</a>
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                            <div id="tab-4" class="tab-pane">
                                <div class="panel-body">
                                    <div class="alert gray-bg">
                                        <p><i class="wi wi-info-sign color-default"></i>当前登录账号必须拥有公众号的主管理员权限</p>
                                        <p><i class="wi wi-info-sign color-default"></i>公众号必须具有卡券功能</p>
                                        <p><i class="wi wi-info-sign color-default"></i>公众号和小程序必须绑定到同一个
                                            <a class="text-primary" href="https://open.weixin.qq.com" target="_blank">微信开放平台</a>上</p>
                                    </div>
                                    <form action="shop_sale.html" method="post" class="form-horizontal form material-content" id="form">
                                        <p style="margin-left: 30px">
                                            当前已选公众号：暂未设置公众号</p>
                                        <div class="panel-body we7-padding material-body">
                                            <div class="row js-show-account-content">
                                                <div class="col-sm-2" style="">
                                                    <div data-uniacid="{$owned_account['uniacid']}" class="item {if $settings['coupon_uniacid'] == $owned_account['uniacid']}active{/if}">
                                                        <img class="icon" src="img/angular_logo.png">
                                                        <div class="name">我的</div>
                                                        <div class="mask">
                                                            <span class="wi wi-right"></span>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="form-group col-sm-12">
                                            <input type="button" name="button" value="提交" class="btn btn-primary col-lg-1" />
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </div>


                    </div>
                </div>
            </div>

        </div>
        <div class="footer">
            <div class="pull-right">
                10GB of <strong>250GB</strong> Free.
            </div>
            <div>
                <strong>Copyright</strong> Example Company &copy; 2014-2015
            </div>
        </div>

        </div>
        </div>




    <!-- 添加营销规则 -->
    <div id="guize" class="modal inmodal fade" aria-hidden="true">
        <div class="modal-dialog modal-lg">
            <div class="modal-content">
                <div class="modal-header">
                    <h4>添加营销规则</h4>
                </div>
                <div class="modal-body">


                    <form id="form-guize" action="form_wizard.html#" class="wizard-big">
                        <h1>基本信息</h1>
                        <fieldset>
                            <div class="row">
                                <div class="form-group">
                                    <label class="col-xs-12 col-sm-3 col-md-2 control-label"><span class="text-danger">*</span> 活动名称</label>
                                    <div class="col-sm-9 col-xs-12">
                                        <input type="text" class="form-control" name="title" value="我的优惠活动" />
                                        <div class="help-block"></div>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-xs-12 col-sm-3 col-md-2 control-label"><span class="text-danger">*</span> 活动时间</label>
                                    <div class="col-sm-9 col-xs-12">
                                        2018-05-23 -- 2018-05-24
                                        <div class="help-block"></div>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-xs-12 col-sm-3 col-md-2 control-label"><span class="text-danger">*</span> 执行规则</label>
                                    <div class="col-sm-9 col-xs-12">
                                        <div class="input-group">
                                            <span class="input-group-addon">当消费满</span>
                                            <input type="text" class="form-control" name="reduce_cost" value="50" />
                                            <span class="input-group-addon">元时赠送</span>
                                        </div>
                                        <div class="" style="margin-top: 10px;">
                                            <label><input type="checkbox" name="repeat_send" id="repeat-send" value="1" checked="checked">重复赠送（消费每满消费值后会重复赠送）</label>
                                        </div>
                                        <div class="input-group repeat-send" style="margin-top: 10px;">
                                            <span class="input-group-addon">最多赠送</span>
                                            <input type="text" class="form-control" name="limit_send" placeholder="不限制请设置为0"  value="0"/>
                                            <span class="input-group-addon">次</span>
                                        </div>
                                        <div class="help-block"></div>
                                    </div>
                                </div>
                            </div>

                        </fieldset>
                        <h1>赠券管理</h1>
                        <fieldset>

                            <a class="btn btn-success" id="choose-coupon" href="#coupon-modal" data-toggle="modal">选择优惠券</a>
                            <div class="coupon-list">
                                <!--<div class="panel we7-panel panel-default coupon-none" >
                                    <div class="panel-body" style="text-align: center;padding:30px;">
                                        还未选择优惠券
                                    </div>
                                </div>-->
                                <div class="panel we7-panel panel-default coupon-con coupon{$coupon_info['id']}">
                                    <div class="panel-heading clearfix">
                                        <div class="col-sm-6">优惠券信息</div>
                                        <div class="col-sm-3"></div>
                                        <div class="col-sm-3">每人每次发券数量</div>
                                    </div>
                                    <div class="panel-body">
                                        <input type="hidden" name="couponid[]" value="1">
                                        <div class="col-sm-6">
                                            <div class="coupon-box">
                                                <div class="around-l"></div>
                                                <div class="around-r"></div>
                                                <div class="title">我的优惠</div>
                                                <div class="content">
                                                    <span class="price">￥100</span>
                                                    <div class="limit">满100可用</div>
                                                    <p class="deadline">12</p>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-sm-3 trash-box"><i data-couponid="{$coupon_info['id']}" data-toggle="tooltip" data-placement="top" data-original-title="移除该卡券" class="fa fa-trash remove-coupon"></i></div>
                                        <div class="col-sm-3">
                                            <div class="input-group">
                                                <span class="input-group-addon minus" data-couponid="{$coupon_info['id']}">-</span>
                                                <input type="text" class="form-control coupon-count" name="coupon_count[{$coupon_info['id']}]" value="1" readonly="" />
                                                <span class="input-group-addon plus" data-couponid="{$coupon_info['id']}">+</span>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </fieldset>

                        <h1>完成</h1>
                        <fieldset>
                            <h2>营销规则已添加...</h2>
                        </fieldset>
                    </form>



                </div>

                <div class="modal-footer">
                    <button type="button" class="btn btn-sm btn-white" data-dismiss="modal">关闭</button>
                    <button type="button" class="btn btn-sm btn-primary" data-dismiss="modal">保存</button>
                </div>
            </div>
        </div>
    </div>

    <div>
    </div>

    <div class="modal fade" id="coupon-modal" tabindex="-1" role="dialog" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="myModalLabel">选择优惠券</h4>
                </div>
                <div class="modal-body clearfix form-horizontal">

                    <select class="form-control" id="couponid">
                        <option value="" >我的优惠券</option>
                    </select>

                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                    <button type="button" class="btn btn-primary coupon-confirm" data-dismiss="modal">确定</button>
                </div>
            </div>
        </div>
    </div>

    <!--领取日志-->
    <div class="modal fade" id="log" tabindex="-1" role="dialog" aria-hidden="true">
        <div class="modal-dialog modal-lg">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="myModalLabel">领取记录</h4>
                </div>
                <div class="modal-body clearfix form-horizontal">

                    <table class="table table-bordered table-hover">
                        <thead class="navbar-inner">
                        <tr>
                            <th width="150">优惠券名称</th>
                            <th width="90">领取方式</th>
                            <th width="210">领取人</th>
                            <th width="150">code码</th>
                            <th width="60">状态</th>
                            <th width="150">领取时间</th>
                            <th style="width:150px; text-align:center;">操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr>
                            <td>我的优惠券</td>
                            <td>
                                <span class="label label-danger">朋友赠送</span>
                                <!--<span class="label label-success"></span>-->
                            </td>
                            <td>wyb</td>
                            <td>123qazwsxedc</td>
                            <td>
                                <span class="label label-warning">已失效</span>
                                <!--<span class="label label-success">未使用</span>
                                <span class="label label-warning">已失效</span>
                                <span class="label label-danger">已核销</span>
                                <span class="label label-default">已删除</span>-->
                            </td>
                            <td>2018-05-25 23:00:00</td>

                            <td style="text-align:center;">
                                <a href="javascript:;" class="btn btn-white btn-sm" title="核销优惠券">核销</a>
                                <a href="javascript:;" class="btn btn-white btn-sm" title="删除兑换记录">删除</a>
                            </td>
                        </tr>
                        </tbody>
                    </table>

                </div>
                <div class="modal-footer">
                    <!--<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                    <button type="button" class="btn btn-primary coupon-confirm" data-dismiss="modal">确定</button>-->
                </div>
            </div>
        </div>
    </div>

    <!--卡券-->
    <div class="modal fade" id="chooseCouponType1" tabindex="-1" role="dialog" aria-hidden="true">
        <div class="modal-dialog modal-lg">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="myModalLabel">添加优惠券</h4>
                </div>
                <div class="modal-body clearfix form-horizontal">
                    <form action="" method="post" class="form-horizontal form" enctype="multipart/form-data" id="form">
                        <div class="form-group">
                            <label class="col-xs-12 col-sm-3 col-md-2 control-label"><span class="text-danger">*</span> 优惠券标题</label>
                            <div class="col-sm-9 col-xs-12">
                                <input type="text" class="form-control" name="title"/>
                                <div class="help-block">不超过18个字符</div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-12 col-sm-3 col-md-2 col-lg-2 control-label"><span class="text-danger">*</span> 商户LOGO</label>

                            <div class="col-md-9" id="logo_upload">
                                <img src="img/a2.jpg">
                            </div>

                        </div>
                        <div class="form-group">
                            <label class="col-xs-12 col-sm-3 col-md-2 control-label"><span class="text-danger">*</span> 商户名称</label>
                            <div class="col-sm-9 col-xs-12">
                                <input type="text" class="form-control" name="brand_name"/>
                                <div class="help-block">商户名字,字数上限为12个汉字。 </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-12 col-sm-3 col-md-2 control-label"><span class="text-danger">*</span> 卡券颜色</label>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-12 col-sm-3 col-md-2 control-label"><span class="text-danger"></span> 最低消费</label>
                            <div class="col-sm-9 col-xs-12">
                                <div class="input-group">
                                    <span class="input-group-addon">满</span>
                                    <input type="text" class="form-control" name="least_cost" />
                                    <span class="input-group-addon">元可用</span>
                                </div>
                                <div class="help-block">最低消费必须大于减免金额</div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-12 col-sm-3 col-md-2 control-label"><span class="text-danger">*</span> 减免金额</label>
                            <div class="col-sm-9 col-xs-12">
                                <div class="input-group">
                                    <input type="text" class="form-control" name="reduce_cost"/>
                                    <span class="input-group-addon">元</span>
                                </div>
                                <div class="help-block">减免金额只能是大于0.01的数字</div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="" class="col-xs-12 col-sm-3 col-md-2 control-label">卡券分享</label>
                            <div class="col-sm-9 col-xs-12">
                                <label class="checkbox-inline">
                                    <input type="checkbox" name="can_share" value="1" id="can_share">用户可以分享领券链接
                                </label>
                                <label class="checkbox-inline">
                                    <input type="checkbox" name="can_give_friend" value="1" id="can_give_friend">用户领券后可转赠其他好友
                                </label>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-12 col-sm-3 col-md-2 control-label" style="padding-top:15px"> 有效期</label>
                            <div class="col-sm-9 col-xs-12">
                                <div class="radio">
                                    <div class="col-sm-3" style="padding-top:6px"><label><input type="radio" value="1" name="time_type" checked/>固定日期 </label></div>
                                    2018-05-25 - 2018-05-30
                                </div>
                                <div class="radio">
                                    <div class="col-sm-3" style="padding-top:6px"><label><input type="radio" value="2" name="time_type"/>领取后 </label></div>
                                    <div class="col-sm-3" style="margin-left:-15px">
                                        <select name="deadline" id="deadline" class="form-control">
                                            <option value="">6天</option>
                                            <option value="">7天</option>
                                            <option value="">8天</option>
                                            <option value="">9天</option>
                                        </select>
                                    </div>
                                    <div class="col-sm-3" style="padding-top:6px">有效,有效期</div>
                                    <div class="col-sm-3" style="margin-left:-15px">
                                        <select name="limit" id="limit" class="form-control">
                                            <option value="">6天</option>
                                            <option value="">7天</option>
                                            <option value="">8天</option>
                                            <option value="">9天</option>
                                        </select>
                                    </div>

                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-12 col-sm-3 col-md-2 control-label"><span class="text-danger">*</span> 库存</label>
                            <div class="col-sm-9 col-xs-12">
                                <div class="input-group">
                                    <input type="text" class="form-control" name="quantity" value="300"/>
                                    <span class="input-group-addon">份</span>
                                </div>
                                <div class="help-block">库存只能是大于0的数字</div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-12 col-sm-3 col-md-2 control-label"><span class="text-danger"></span> 领券限制</label>
                            <div class="col-sm-9 col-xs-12">
                                <div class="input-group">
                                    <input type="text" class="form-control" name="get_limit" value="1"/>
                                    <span class="input-group-addon">张</span>
                                </div>
                                <div class="help-block">默认领券限制为1</div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-12 col-sm-3 col-md-2 control-label">优惠共享</label>
                            <div class="col-sm-9 col-xs-12">
                                <select style="height: 30px;" id="can_use_with_other_discount" name="can_use_with_other_discount" class="form-control">
                                    <option value="1">可与其他优惠共享</option>
                                    <option value="0">不与其他优惠共享</option>
                                </select>
                                <p class="help-block">使用条件的设置会在券上展示，请务必仔细确认。(仅卡券显示用)</p>
                            </div>

                        </div>
                        <div class="form-group"><label class="col-xs-12 col-sm-3 col-md-2 control-label">销券方式</label> <div class="col-sm-9 col-xs-12"><div class="radio"><label><input type="radio" name="code_type" value="1"> 仅卡券号</label> <div class="help-block">只显示卡券号，验证后可进行销券</div></div> <div class="radio"><label><input type="radio" name="code_type" value="2"> 二维码</label> <div class="help-block">包含卡券信息的二维码，扫描后可进行销券</div></div> <div class="radio"><label><input type="radio" name="code_type" value="3" checked="checked"> 条形码</label> <div class="help-block">包含卡券信息的条形码，扫描后可进行销券</div></div></div></div>

                        <div class="form-group"><label class="col-xs-12 col-sm-3 col-md-2 control-label"><span class="text-danger">*</span> 操作提示</label> <div class="col-sm-9 col-xs-12"><input type="text" name="notice" id="notice" value="请在付款时出示此券" class="form-control"> <div class="help-block">建议引导用户到店出示卡券，由店员完成核销操作。不超过16个字符</div></div></div>

                        <div class="form-group">
                            <label class="col-xs-12 col-sm-3 col-md-2 control-label">优惠详情</label>
                            <div class="col-sm-9 col-xs-12">
                                <textarea name="default_detail" rows="5" class="form-control"></textarea>
                                <p class="help-block">文本长度不能超过300字</p>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-12 col-sm-3 col-md-2 control-label">使用须知</label>
                            <div class="col-sm-9 col-xs-12">
                                <textarea name="description" rows="5" class="form-control"></textarea>
                                <p class="help-block">文本长度不能超过300字</p>
                            </div>
                        </div>
                    </form>


                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                    <button type="button" class="btn btn-primary coupon-confirm" data-dismiss="modal">确定</button>
                </div>
            </div>
        </div>
    </div>

    <!-- 添加社交立减金 -->
    <div id="shejiaolijian" class="modal inmodal fade" aria-hidden="true">
        <div class="modal-dialog modal-lg">
            <div class="modal-content">
                <div class="modal-header">
                    <h4>添加社交立减金</h4>
                </div>
                <div class="modal-body">

                    <form action="" method="post" class="form-horizontal form">
                        <div class="form-group">
                            <label class="col-xs-12 col-sm-3 col-md-2 control-label"><span class="text-danger">*</span> 选择代金券</label>
                            <div class="col-sm-9 col-xs-12">
                                <select class="form-control" name="card_id">
                                    <option value="{$coupon['card_id']}">我的立减金</option>
                                </select>
                                <div class="help-block"></div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-12 col-sm-3 col-md-2 control-label"><span class="text-danger">*</span> 活动封面背景颜色</label>
                            <div class="col-sm-9 col-xs-12">
                                <div class="help-block"></div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-12 col-sm-3 col-md-2 control-label"><span class="text-danger">*</span> 活动时间</label>
                            <div class="col-sm-9 col-xs-12">
                                2018-05-23 --  2018-05-24
                                <div class="help-block"></div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-12 col-sm-3 col-md-2 control-label"><span class="text-danger">*</span> 单个礼包社交立减金数量</label>
                            <div class="col-sm-9 col-xs-12">
                                <input type="text" class="form-control" name="gift_num" value="3" />
                                <div class="help-block"><span class="text-danger">数量为3-15个
</span></div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-12 col-sm-3 col-md-2 control-label"><span class="text-danger">*</span> 单用户活动期间最多领取次数</label>
                            <div class="col-sm-9 col-xs-12">
                                <input type="text" class="form-control" name="max_partic_times_act" value="1"/>
                                <div class="help-block">每个用户活动期间最大领取次数,最大为50，不填默认为1</div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-12 col-sm-3 col-md-2 control-label"><span class="text-danger">*</span> 单用户每日最多领取次数</label>
                            <div class="col-sm-9 col-xs-12">
                                <input type="text" class="form-control" name="max_partic_times_one_day" value="1"/>
                                <div class="help-block">每个用户活动期间单日最大领取次数,最大为50，不填默认为1</div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-12 col-sm-3 col-md-2 control-label"><span class="text-danger">*</span> 最少支付金额</label>
                            <div class="col-sm-9 col-xs-12">
                                <input type="text" class="form-control" name="min_amt" value="1"/>
                                <div class="help-block">最少支付金额，单位是<span class="text-danger">分</span></div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-12 col-sm-3 col-md-2 control-label">发放人群</label>
                            <div class="col-sm-9 col-xs-12">
                                <label class="radio-inline">
                                    <input type="radio" name="to_user" value="total_user" checked=""> 所有用户
                                </label>
                                <label class="radio-inline">
                                    <input type="radio" name="to_user" value="new_tinyapp_user" > 小程序新用户
                                </label>
                                <div class="help-block"></div>
                            </div>
                        </div>
                    </form>
                </div>

                <div class="modal-footer">
                    <button type="button" class="btn btn-sm btn-white" data-dismiss="modal">关闭</button>
                    <button type="button" class="btn btn-sm btn-primary" data-dismiss="modal">保存</button>
                </div>
            </div>
        </div>
    </div>



    <!-- 卡券-->
    <div class="modal fade" id="chooseCouponType" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <h4>选择你要创建的卡券类型</h4>
                </div>
                <div class="modal-body">

                    <form action="" method="post" class="form-horizontal form">

                        <div class="form-group">
                            <label class="col-xs-12 col-sm-3 col-md-2 control-label"></label>
                            <div class="col-sm-9 col-xs-12">
                                <label class="radio-inline">
                                    <input type="radio" name="type" id="couponType" value="general_coupon" checked=""> 微信代金券
                                </label>
                                <div class="help-block"></div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-12 col-sm-3 col-md-2 control-label"></label>
                            <div class="col-sm-9 col-xs-12">
                                <label class="radio-inline">
                                    <input type="radio" name="type" id="couponType" value="cash"> 社交代金券
                                </label>
                                <div class="help-block">该代金券需先完成“免充值模式验收”</div>
                            </div>
                        </div>

                    </form>
                </div>

                <div class="modal-footer">
                    <button type="button" class="btn btn-sm btn-white" data-dismiss="modal">关闭</button>
                    <button type="button" class="btn btn-sm btn-primary" data-dismiss="modal">保存</button>
                </div>
            </div>
        </div>
    </div>



    <!-- Mainly scripts -->
    <script src="js/jquery-2.1.1.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <script src="js/plugins/metisMenu/jquery.metisMenu.js"></script>
    <script src="js/plugins/slimscroll/jquery.slimscroll.min.js"></script>

    <!-- Peity -->
    <script src="js/plugins/peity/jquery.peity.min.js"></script>

    <!-- Custom and plugin javascript -->
    <script src="js/inspinia.js"></script>
    <script src="js/plugins/pace/pace.min.js"></script>

    <!-- iCheck -->
    <script src="js/plugins/iCheck/icheck.min.js"></script>

    <!-- Peity -->
    <script src="js/demo/peity-demo.js"></script>


    <!-- Sweet alert -->
    <script src="js/plugins/sweetalert/sweetalert.min.js"></script>

    <!-- Steps -->
    <script src="js/plugins/staps/jquery.steps.min.js"></script>

    <script>
        $(document).ready(function(){
            $('.i-checks').iCheck({
                checkboxClass: 'icheckbox_square-green',
                radioClass: 'iradio_square-green',
            });



            $('.demo1').click(function(){

                swal({
                    title: "确认接单?",
                    text: "接单后无法取消!",
                    type: "warning",
                    cancelButtonText:"取消",
                    showCancelButton: true,
                    confirmButtonColor: "#DD6B55",
                    confirmButtonText: "确定!",
                    closeOnConfirm: false
                }, function () {
                    swal("成功接单", "菜品制作中,请稍后...", "success");
                });
            });















            $("#wizard").steps();
            $("#form-guize").steps({
                bodyTag: "fieldset",
                onStepChanging: function (event, currentIndex, newIndex)
                {
                    // Always allow going backward even if the current step contains invalid fields!
                    if (currentIndex > newIndex)
                    {
                        return true;
                    }

                    return true;
                },
                onStepChanged: function (event, currentIndex, priorIndex)
                {
                    // Suppress (skip) "Warning" step if the user is old enough.
                    if (currentIndex === 2 && Number($("#age").val()) >= 18)
                    {
                        $(this).steps("next");
                    }

                    // Suppress (skip) "Warning" step if the user is old enough and wants to the previous step.
                    if (currentIndex === 2 && priorIndex === 3)
                    {
                        $(this).steps("previous");
                    }
                },
                onFinishing: function (event, currentIndex)
                {

                    return true;
                },
                onFinished: function (event, currentIndex)
                {
                }
            });
        });
    </script>

</body>

</html>
